<template>
	<view v-if="pageShow" style="padding-bottom: 150rpx;">
		<u-popup :show="show" @close="close">
			<view class="mainpadding dingwei">
				<view class="sanshier xiaohei fonweight textcenter margin_top">XXX场地邀你加入会员</view>
				<view class="xiahuaxian">
					<view class="ershiba xiaohei nofonweight textcenter margin_top2">您将享受以下权益 </view>
				</view>
				<view class="ershil xiaohei nofonweight textcenter margin_top4">优先订场</view>
				<view class="ershil xiaohei nofonweight textcenter margin_top4">订场优惠</view>
				<view class="margin_top6 ">
					<view class="flexleft">
						<view class="xiaocon margin_right1"></view>
						<u-icon class="margin_right1" name="checkmark-circle-fill" color="#E3C385" size="18"></u-icon>
						<view class="strongtext xiaohei nofonweight textcenter">同意XXX场地的会员规则</view>
					</view>
					<view class="huangbtnty margin_top2" @click="tzhyx">申请加入</view>
				</view>
				<image class="huiyuantb" src="../static/image/system/huiyuan.png" mode=""></image>
			</view>
		</u-popup>
		<!-- 场馆信息 -->
		<view class="dingwei">
			<image class="bannrcg" :src="dataAll.bg_image_text" mode=""></image>
			<view class="zyxxbox">
				<view class="xiaobai titletext fonweight">{{dataAll.name}}</view>
				<view class="xiaobai ershil nofonweight margin_top0">联系方式：{{dataAll.mobile}}</view>
				<view class="xiaobai ershil nofonweight margin_top0">联系地址：{{dataAll.cityinfo}}{{dataAll.address}}</view>
			</view>
		</view>
		<view class="" style="position: relative; top: -35rpx;">
			<!-- 详细介绍 -->
			<view class="mainpadding ffffff margin_top1">
				<view class="xiaohei fonweight sanshier">详细介绍</view>
				<view class="nofonweight xiaohui margin_top1">{{dataAll.des}}</view>
				<!-- 温馨提示 -->
				<view class="margin_top4" v-if="dataAll.bq_names_text.length">
					<view class="xiaohei fonweight sanshier">场馆设施</view>
					<view class="flexleft flex_wrap">
						<view class="lvbtn margin_top2 margin_right1" v-for="(item,index) in dataAll.bq_names_text"
							:key="index">{{item}}</view>
					</view>
				</view>
				<!-- 入场规则 -->
				<view class="margin_top4" v-if="dataAll.rc_gz">
					<view class="xiaohei fonweight sanshier">入场规则</view>
					<view class="nofonweight xiaohui margin_top2">{{dataAll.rc_gz}}</view>
				</view>
				<!-- 场馆视频 -->
				<view class="margin_top4" v-if="dataAll.video_text">
					<view class="xiaohei fonweight sanshier">场馆视频</view>
					<view class=" margin_top">
						<video :src="dataAll.video_text" object-fit="cover" style="width: 100%;height: 350rpx;"></video>
					</view>
				</view>
				<!-- 场馆图片 -->
				<view class="margin_top4" v-if="dataAll.images">
					<view class="xiaohei fonweight sanshier">场馆图片</view>
					<view class="margin_top2">
						<image class="cgtpiam" :src="item" mode="widthFix" v-for="(item,index) in dataAll.images_text"
							:key="index" @click="lbtpriview(index,dataAll.images_text)"></image>
					</view>
				</view>
			</view>
		</view>
		<view class="gudingdb mainpadding flexbetween ffffff">
			<view class="bigbtn margin_right6" style="background-color: #ffa126;" @click="jumpurl('/pages_mypage/changdishijianb')">时间表</view>
			<view class="bigbtn" @click="jumpurl('/pages_mypage/changguanbj')">修改</view>
		</view>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")

	export default {
		data() {
			return {
				show: false,
				dataAll: {},
				pageShow: false,
				listjl: [],
				user_zbfapply_listid:""
			}
		},
		onLoad(options) {
			this.user_zbfapply_listid=options.user_zbfapply_listid
		},
		onShow() {
			this.getDetail()
		},
		methods: {
			jumpurl(url) {
				uni.navigateTo({
					url:url+"?user_zbfapply_listid="+this.user_zbfapply_listid
				})
			},
			getDetail() {
				httpRequest.request('/api/user/userZbfapplyDetail', 'GET', {
					id:this.user_zbfapply_listid
				}, false, false, true).then(res => {
					this.dataAll = res.data
					this.pageShow = true
				})
			},
			lbtpriview(index, arr) {
				var i = arr; //获取当前页面的轮播图数据
				//uniapp预览轮播图
				uni.previewImage({
					current: index, //预览图片的下标
					urls: i //预览图片的地址，必须要数组形式，如果不是数组形式就转换成数组形式就可以
				})
			},
			// 跳转场地教练
			tzcdjl() {
				uni.navigateTo({
					url: '/pages_homepage/changdijiaol'
				})
			},
			// 跳转会员中心
			tzhyx() {
				uni.navigateTo({
					url: '/pages_homepage/huiyuanzx'
				})
			},
			close() {
				this.show = false
				// console.log('close');
			}
		}
	}
</script>

<style lang="scss" scoped>
	.lvbtn {
		background: #DFFFED;
		border-radius: 8rpx 8rpx 8rpx 8rpx;
		padding: 6rpx 10rpx;
		font-size: 20rpx;
		font-family: PingFang SC-Regular, PingFang SC;
		font-weight: 400;
		color: #1BA95B;
	}

	.huiyuantb {
		width: 132rpx;
		height: 132rpx;
		position: absolute;
		top: -84rpx;
		left: 310rpx;
	}

	.xiaocon {
		width: 24rpx;
		height: 24rpx;
		background: #FFFFFF;
		border-radius: 50%;
		border: 2rpx solid #AAAAAA;
	}

	.menlc {
		height: 360rpx;
		width: 100%;
		position: absolute;
		bottom: 6rpx;
		left: 0;
		border-radius: 16rpx;
		background-color: hsla(0, 0%, 0%, .3);
	}

	.fudsp {
		position: absolute;
		bottom: 140rpx;
		left: 304rpx;
		width: 80rpx;
		height: 80rpx;
	}

	.cgtpiam {
		width: 100%;
	}

	.jiaolt {
		width: 210rpx;
		height: 210rpx;

		image {
			border-radius: 10rpx;
			width: 100%;
			height: 100%;
		}
	}

	.huner {
		position: absolute;
		bottom: 30rpx;
		right: 30rpx;
		width: 90%;
	}

	.kabtn {
		padding: 6rpx 20rpx 8rpx;
		background-color: #6A4B18;
		font-size: 24rpx;
		font-family: PingFang SC-Regular, PingFang SC;
		font-weight: 400;
		color: #FFFFFF;
		border-radius: 30rpx;
	}

	.huiytu {
		height: 100rpx;
		width: 100%;

		image {
			width: 100%;
			height: 100%;
		}
	}

	.blockhy {
		border-radius: 20rpx 20rpx 0rpx 0rpx;
	}

	page {
		background-color: #F9F9F9;
	}

	.zyxxbox {
		position: absolute;
		bottom: 60rpx;
		left: 30rpx;
	}
</style>